package com.study.spring.ch06.model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

public class UserModel {
	  @NotNull(message="{username.not.empty}")
	  @Size(min=3,max=10,message="length between 3 and 10")
	  private String username;
	  @Min(value=20,message="{age.min}")
	  private Integer age;
	  
	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
	}
